﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;
using Com.CMS263.DAO;
namespace Com.CMS263.BLL
{
    
    public class UserRoleBLL
    {
        UserRoleDAO rud = new UserRoleDAO();
        public void Add(UserRole userRole)
        {
            rud.Add(userRole);
        }
        public void Modify(UserRole userRole)
        {
            rud.UpdateRole(userRole);
        }
        public void DeleteRoleById(int id)
        {
            rud.DeleteRoleByRoleID(id);
        }

        public IList<UserRole> GetAllRole()
        {
            return rud.GetAllRole();
        }

        public bool isExist(string roleName)
        {
            return rud.isExist(roleName);
        }
    }
}
